<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt"%>
<%@ taglib prefix="wr_fn" uri="http://njo.org/taglib/functions"%>
<table width="98%">
  <tr>
    <td class="left"><a name="title"><b>测试消息</b></a></td>
  </tr>
</table>
<form name="f2" action="${pageContext.request.contextPath}/testmessage.tiles" method="post">
<table class="forum" width="98%">
<col width="120"/>
<col width="*"/>
<tbody>
  <tr>
    <th colspan="2">Message </th>
  </tr>
  <tr>
    <td>Message Key:</td>
    <td><input type="hidden" name="messageKey" value="${param.messageKey}"/>${param.messageKey}</td>
  </tr>
  <tr>
    <td>Arguments:</td>
    <td><input type="text" name="messageArgs" value="${param.messageArgs}"/></td>
  </tr>
</tbody>
</table>
<br/>
<table width="98%">
  <tr>
    <td class="right"><input type="submit" name="save" value="测试"/> <input type="submit" name="edit" value="编辑" onclick="javascript:document.f2.action='${pageContext.request.contextPath}/processor.loadmessage.tiles';"/></td>
  </tr>
</table>
<br/>
<c:set var="args" value="${wr_fn:isEmpty(param.messageArgs) ? null : fn:split(param.messageArgs, ',')}"/>
<table class="forum" width="98%">
<col width="*"/>
<tbody>
  <tr>
    <th>Message Content</th>
  </tr>
  <tr>
    <td>${wr_fn:message(pageContext, param.messageKey, args)}</td>
  </tr>
</tbody>
</table>


</form>